'use strict'

const Controller = require('egg').Controller

class HomeController extends Controller {
  async index() {
    const { ctx } = this
    ctx.body = 'hi, egg'
  }
  async code() {
    const { ctx } = this
    const list = Math.random().toString().slice(2, 6)
    console.log(list)
    ctx.body = {
      code: 200,
      msg: '验证码获取到',
      list,
    }
  }
}

module.exports = HomeController
